<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
     //第一道题目:浅拷贝
    //  var obj = {name:"习大大",age:18,sex:'男'};
    //  var obj1 = obj;
    //  obj1.name = '豪哥';
    //  console.log(obj);
     //深拷贝:JSON、递归
</script>
<script>
     
       var obj = {name:'习大大',age:18,sex:'男',hobby:[{"city":'北京'},{"city":'上海'},{"city":'深圳'}]};
       var obj1 = {...obj};

       obj1.hobby[0].city = '哈尔滨';
       console.log(obj);
</script>